/*
 * @Author: 郑宏杰
 * @Date: 2020-07-08 13:36:21
 * @LastEditTime: 2020-07-08 13:56:42
 * @LastEditors: Please set LastEditors
 * @Description: 封装localStorage方法
 * @FilePath: \考试系统\jingkaisystem\src\utils\storage.js
 */
let stroage = {
    //上传到localStorage
    set(key, value) {
        localStorage.setItem(key,JSON.stringify(value))
    },
    //获取localStorage
    get(key) {
        return JSON.parse(localStorage.getItem(key))
    },
    //删除localStorage
    remove(key) {
        localStorage.removeItem(key)
    }
}

export default stroage  //暴露stroage